# -*- encoding: UTF-8 -*-

'''
Created on 14/01/2013

@author: jotagê

'''

from sqlalchemy import create_engine, ForeignKey
from sqlalchemy import Column, Date , Integer , String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship , backref
from sqlalchemy.orm import sessionmaker


engine  =  create_engine ("mysql://root:jotage2@127.0.0.1/teste" , echo= True)
Base = declarative_base()
Secao = sessionmaker(bind=engine)
secao = Secao()

class Artista(Base):
    __tablename__ = 'artistas'
    id = Column(Integer , primary_key=True)
    nome = Column(String(40))
    
    def __init__(self, nome):
        self.nome = nome
           
        




# cria as tabelas
Base.metadata.create_all(engine)
